/***
 * @Author: 玄绮 shijiahansi@qq.com
 * @Date: 2024-06-07 15:13:59
 * @LastEditors: 玄绮 shijiahansi@qq.com
 * @LastEditTime: 2024-06-07 16:22:26
 * @FilePath: \server\dep\rdhttp\fields\ContentType.h
 * @Description:
 * @
 * @Copyright (c) 2024 by 玄绮, All Rights Reserved.
 */

#include <boost/algorithm/string/case_conv.hpp>
#include <string>
#include <string_view>

#ifndef __CONTENT_TYPE_H__
#    define __CONTENT_TYPE_H__

namespace rdhttp {

    class ContentType {
    public:
        enum ContentTypeValue {
            multipart_form_data = 0,
            image_jpeg,
            image_png,
        };

    private:
        std::string data;
        std::string m_value;
        std::string m_boundary;

    protected:
    public:
        ContentType(std::string_view content);
        ContentType();
        ~ContentType();

        void pares(std::string_view content);
        std::string value() const;
        std::string boundary() const;

        bool operator==(ContentTypeValue v) const;
    };
}  // namespace rdhttp

#endif  // __CONTENT_TYPE_H__